#if !defined(FAKE_UNKNOWN_H)
#define FAKE_UNKNOWN_H

#include <rt/Exceptions/NotImplementedException.h>

class FakeIUnknown : public IUnknown
{
public:
	FakeIUnknown() { }

	// IUnknown
	virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) { throw rt::NotImplementedException(); }
	virtual ULONG STDMETHODCALLTYPE AddRef()	{ throw rt::NotImplementedException(); }
	virtual ULONG STDMETHODCALLTYPE Release()	{ throw rt::NotImplementedException(); }
};

#define CONTAIN_UNKNOWN(member_) \
	FakeIUnknown member_; \
	virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) { return member_.QueryInterface(riid, ppvObject); } \
	virtual ULONG STDMETHODCALLTYPE AddRef()	{ return member_.AddRef(); } \
	virtual ULONG STDMETHODCALLTYPE Release()	{ return member_.Release(); }

#endif
